// import JSEncrypt from 'jsencrypt/bin/jsencrypt.min'
// const publicKey = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDDRgm3zzh59jegvAx5sYdrqgk6y3PH24Gm+YUr0Rzu7Ze82qMXuAy5Phvi6x8R31rNIRSkLnaBTekgI92kOu4RlnknlGBRzRJbJDNdxQsfbR9l16fqab+tVjYNE1mhyEPS7pN4uCTdUfFBbOw4aJKY/jxJJXjlzvBt02fz0zp49QIDAQAB'//生成的公钥
// const privateKey = ''

export function encrypt(txt) {
  const base64 = window.btoa(unescape(encodeURIComponent(txt)))
  return base64
  // const encryptor = new JSEncrypt()
  // encryptor.setPublicKey(publicKey) // 设置公钥
  // return encryptor.encrypt(txt) // 对数据进行加密
}

// export function decrypt(txt) {
//   const encryptor = new JSEncrypt()
//   encryptor.setPrivateKey(privateKey) // 设置私钥
//   return encryptor.decrypt(txt) // 对数据进行解密
// }
 